<template>
    <div class="destination-card">
        <div class="card-image">
            <img :src="destination.image" :alt="destination.name">
            <div class="price-tag">{{ destination.price }}</div>
        </div>
        <div class="card-content">
            <h3>{{ destination.name }}</h3>
            <p>{{ destination.description }}</p>
            <button class="btn btn-primary">查看详情</button>
        </div>
    </div>
</template>

<script>
    export default {
        name: 'DestinationCard',
        props: {
            destination: {
                type: Object,
                required: true
            }
        }
    }
</script>

<style scoped>
    .destination-card {
        border-radius: 8px;
        overflow: hidden;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        transition: transform 0.3s, box-shadow 0.3s;
    }

    .destination-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    }

    .card-image {
        position: relative;
        height: 200px;
    }

    .card-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .price-tag {
        position: absolute;
        bottom: 10px;
        right: 10px;
        background: rgba(255, 255, 255, 0.9);
        padding: 5px 10px;
        border-radius: 4px;
        font-weight: 600;
        color: #0984e3;
    }

    .card-content {
        padding: 1.5rem;
    }

    .card-content h3 {
        margin-bottom: 0.5rem;
        color: #2d3436;
    }

    .card-content p {
        color: #636e72;
        margin-bottom: 1rem;
    }

    .btn {
        padding: 8px 16px;
        border-radius: 4px;
        font-weight: 500;
        cursor: pointer;
    }

    .btn-primary {
        background: #0984e3;
        border: 1px solid #0984e3;
        color: white;
    }
</style>